#ifndef IMAGEDISPLAY_H
#define IMAGEDISPLAY_H
/*!
  * \file imagedisplay.h
  * \version 0.1
  */
#include <QLabel>
#include <QPainter>
#include <drawshape.h>
#include <image.h>

#include <QDebug>
/*!
  * \class ImageDisplay
  * \brief Class to display and work an image
  */
class ImageDisplay : public QLabel
{
    Q_OBJECT
private:
    QPixmap image;
    QPoint mousePosClic;
    QPoint mousePosCurrent;
    QPoint mousePosRelease;
    ShapeType designedShape;

protected:
    void paintEvent(QPaintEvent *);

public:
    /*!
      * \fn ImageDisplay();
      * \brief constructor of classe to display current image
      */
    ImageDisplay();
    void setImage(Image img);
    void imgMouseClic();
    void imgMouseMove();
    DrawShape imgMouseRelease();

public slots:
    void setDrawShape(ShapeType type);
};

#endif // IMAGEDISPLAY_H
